# Replication Materials for  
**"The State of Populism: Introducing the 2023 Wave of the Populism and Political Parties Expert Survey"**  
**Published in _Party Politics_**

This repository contains all materials necessary to replicate the analyses, tables, and figures presented in the article.

---

## 📁 Contents

### 1. RStudio Project File (`.Rproj`)

This repository includes an RStudio Project file:  
**`POPPA2_replication.Rproj`**

We recommend opening the replication materials by launching this project file in RStudio. This ensures:

- The working directory is set correctly.
- All file paths using the `here()` package function as intended.
- Output files are exported to the correct folders.

This setup improves reproducibility and reduces the likelihood of file path errors.

---

### 2. Quarto Document (`.qmd`)

**`state_of_populism_version_final_REPLICATION.qmd`**  
This is the main Quarto document used to generate the figures, tables, and text presented in the article.

> ⚠️ **Note:** The written text may differ slightly from the final published version due to copy editing. The `.qmd` file is provided to offer transparency regarding the structure and logic of the analysis.

---

### 3. R Script (`.R`)

**`state_of_populism_version_final_REPLICATION.R`**  
This standalone R script, exported from the Quarto document, includes all R code used for data preparation and analysis.

---

### 4. `data/` Folder

This folder contains all datasets needed to reproduce the results:

- **Main analysis dataset:**
  - `poppa_integrated.rds`: Integrated POPPA dataset used for all main analyses.

- **Expert-level and party list files:**
  - `all_expert.dta`: Expert-level data from 2018 wave.
  - `POPPA_List_of_parties_2018.xlsx`: Party list from the 2018 wave.
  - `poppa2_expert.RDS`: Expert-level data from the 2023 wave.
  - `POPPA_List_of_parties_2022.xlsx`: Party list from the 2023 wave.

---

### 5. `cfa_tables/` Folder

To fully replicate the analysis, ensure the folder `cfa_tables` is included in your working directory. This folder contains output files generated with the **semTable** package and re-imported into the Quarto document for consistent formatting of Confirmatory Factor Analysis (CFA) results.

---

### 6. Bibliography and Reference Files

To render the Quarto document successfully, the following files are needed:

- `references.bib`: Bibliographic references used for citations.
- `session.packages.bib`: Records R package versions and bibliographic metadata for reproducibility.

---

### 7. A few small changes in the replication file for the Online Appendix. 

In the descriptive table in the Online Appendix we made two small additions. 

1. We added the party families to the descriptive table in the Online Appendix. 
2. We also change the number of decimals that we round a few variables in the descriptive table in the Online Appendix. In the paper for aesthetic reasons we round to less decimal points. 

See the explanation and the code in the Quarto document form more detailed information. 

---

## ⚙️ Notes on `semTable` Installation

The paper uses the **semTable** package to generate publication-ready CFA tables from `lavaan` model output. Although no longer available on CRAN, it can be installed from the archive.

To install `semTable` and its dependency `stationery`, run the following:

<pre><code>R
# Install devtools if not already installed
if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

# Install archived dependencies
if (!requireNamespace("stationery", quietly = TRUE)) {
  devtools::install_url("https://cran.r-project.org/src/contrib/Archive/stationery/stationery_1.1.tar.gz")
}

if (!requireNamespace("semTable", quietly = TRUE)) {
  devtools::install_url("https://cran.r-project.org/src/contrib/Archive/semTable/semTable_1.8.tar.gz")
}
</code></pre>

👉 **Restart your R session if you encounter any loading issues.**

---

## 📬 Contact

For questions or issues related to the replication materials, please contact:  
**Andrej Zaslove** — [andrej.zaslove@ru.nl](mailto:andrej.zaslove@ru.nl)

---

## 📖 Citation

**We will update this when the full publication comes online.**

If you use this dataset or code, please cite the article as follows:

**Plain text citation:**  
Zaslove, Andrej, Robert Huber, and Maurits Meijers. (2025). *The State of Populism: Introducing the 2023 Wave of the Populism and Political Parties Expert Survey*. *Party Politics*. https://doi.org/10.1177/13540688251361813

**BibTeX:**
```bibtex
@article{zaslove2025,
  author = {Zaslove, Andrej, Huber, Robert, and Meijers, Maurits},
  title = {The State of Populism: Introducing the 2023 Wave of the Populism and Political Parties Expert Survey},
  journal = {Party Politics},
  year = {2025},
  volume = {...},
  pages = {...},
  doi = {10.1177/13540688251361813}
}
